﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Chinaer.Win
{
    public partial class AddCustomer : Form
    {
        public AddCustomer()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                DTO.CustomerDTO customerDTO = new DTO.CustomerDTO();
                customerDTO.LoginName = this.textBox1.Text;
                customerDTO.LoginPassword = this.textBox2.Text;
                customerDTO = ChinaerService.Instance.LoginCustomer(customerDTO);
                this.textBox1.Text = customerDTO.ID;
                MessageBox.Show(customerDTO.ID);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
    }
}
